from common.models.user import User
from common.models.person import Person
from application import db

class Evaluate(db.Model):
    __tablename__ = 'evaluate'

    id = db.Column(db.Integer, primary_key=True)
    sap = db.Column(db.Integer,db.ForeignKey('person.sap'))
    wpyy = db.Column(db.String(60, 'utf8mb4_0900_ai_ci'))
    wpd = db.Column(db.String(60, 'utf8mb4_0900_ai_ci'))
    pjrsap = db.Column(db.Integer,db.ForeignKey('person.sap'))
    pjrgx = db.Column(db.String(30, 'utf8mb4_0900_ai_ci'))


    date = db.Column(db.Date)
    nl = db.Column(db.String(30, 'utf8mb4_0900_ai_ci'))
    yj = db.Column(db.String(30, 'utf8mb4_0900_ai_ci'))

    content = db.Column(db.TEXT)
    yjcontent = db.Column(db.TEXT)

    userinfo = db.relationship('Person', foreign_keys=sap)
    pjrinfo = db.relationship('Person', foreign_keys=pjrsap)